package com.xyx.ssm.jdbcdao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;
import com.xyx.ssm.po.WineProduct;

@Repository
public class WineproductDao extends BaseDao {

	 public int wineproductadd(WineProduct wineProduct) {

		int num = sqlSession.insert(
				"com.xyx.ssm.jdbcdao.wineproductDao.wineproductadd", wineProduct);

		return num;
	}

	public int wineproductDelete(Integer ids) {
		int num = sqlSession.delete(
				"com.xyx.ssm.jdbcdao.wineproductDao.wineproductdelect", ids);

		return num;

	}
	
	public int wineproductUpdate(WineProduct wineProduct){
		int num=sqlSession.update("com.xyx.ssm.jdbcdao.wineproductDao.wineproductupdata", wineProduct
			);
		return num;
		
	}
	
	public List<WineProduct> wineproductId(Integer id){
		List<WineProduct> list=sqlSession.selectList("com.xyx.ssm.jdbcdao.wineproductDao.wineproductid", id);
		return list;
		
	}
}